package com.examine.permission;

import java.lang.annotation.Annotation;

import org.expressme.webwind.Execution;
import org.expressme.webwind.Interceptor;
import org.expressme.webwind.InterceptorChain;
import org.expressme.webwind.InterceptorOrder;
import org.expressme.webwind.Mapping;
import org.expressme.webwind.renderer.Renderer;

/**
 * Transaction interceptor.
 */
@InterceptorOrder(1)
public class PermissionInterceptor implements Interceptor {

    public Renderer intercept(Execution execution, InterceptorChain chain) throws Exception {
    	Annotation xx= execution.getActionAnnotation(LoginRequired.class);
    	Annotation yy= execution.getControllerAnnotation(LoginRequired.class);
    	
    	System.out.print(xx);
    	return chain.doInterceptor(execution);
    }
}
